package com.auto.survey.activity.adjustment.adjustment_high.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey

// 未知点
@Entity(
    tableName = "unknown_points",
    foreignKeys = [
        ForeignKey(
            entity = Project::class,
            parentColumns = ["id"],
            childColumns = ["projectId"],
            onDelete = ForeignKey.CASCADE
        )
    ],
    indices = [Index("projectId")],
)
data class UnknownPoint(
    @PrimaryKey(autoGenerate = true)
    var id: Int = 0,
    val projectId: Int,
    val unknow_point_name: String,
    val unknow_elevation: Double? = null, // 近似高程（可空，未计算时为null）
    val unknow_approx_elevation: Double? = null, // 手动输入的近似高程（可空）
    val unknow_std_dev: Double? = null // 计算后才有值
)